API Documentation
Public Member Functions | List of all members
nkWinUi::InputSystem Class Referencefinal

Input system, centralizing default behaviour for the input. More...

Inheritance diagram for nkWinUi::InputSystem:

Public Member Functions

void registerToTrack (EVENT_TYPE eventType, Component *component)
 
void unregisterTracking (EVENT_TYPE eventType, Component *component)
 
void requestWindowFollow (Component *caller, bool value)
 
mouseClickCallback getMouseClickCallback () const
 
menuBarCallback getMenuBarCallback () const
 
closeCallback getCloseCallback () const
 
contextMenuCreationCallback getContextMenuCreationCallback () const
 
const std::map< Component *, std::pair< bool, bool > > & getFollowedWindows () const
 
void setMouseClickCallback (mouseClickCallback callback)
 
void setMouseLeaveCallback (mouseLeaveCallback callback)
 
void setKeyDownCallback (keyDownCallback callback)
 
void setKeyUpCallback (keyUpCallback callback)
 
void setMenuCallback (menuBarCallback callback)
 
void setCheckBoxCallback (checkBoxCallback callback)
 
void setTreeSelectionCallback (treeSelectionCallback callback)
 
void setListBoxSelectionCallback (listBoxSelectionCallback callback)
 
void setComboSelectionCallback (comboSelectionCallback callback)
 
void setEditBoxKeyCallback (editBoxKeyCallback callback)
 
void setTabWindowCallback (tabWindowCallback callback)
 
void setCloseCallback (closeCallback callback)
 
void setContextMenuCreationCallback (contextMenuCreationCallback callback)
 

Detailed Description

Input system, centralizing default behaviour for the input.

Member Function Documentation

◆ registerToTrack()

void nkWinUi::InputSystem::registerToTrack ( EVENT_TYPE  eventType,
Component component 
)

Register a component for it to listen to events of some kind even if not focused.

Parameters
eventTypeThe type of event to listen to.
componentThe component needing to listen.

◆ unregisterTracking()

void nkWinUi::InputSystem::unregisterTracking ( EVENT_TYPE  eventType,
Component component 
)

Unregister a component from listening to an event kind.

Parameters
eventTypeThe type of event the component needs to stop listening to.
componentThe component needing to stop following the events.

◆ requestWindowFollow()

void nkWinUi::InputSystem::requestWindowFollow ( Component caller,
bool  value 
)

Requests a tracking to know when a mouse is leaving a component.

Parameters
callerThe component that needs to follow the mouse leaving it.
valueIf the tracking needs to occur (true) or not (false).

◆ getMouseClickCallback()

mouseClickCallback nkWinUi::InputSystem::getMouseClickCallback ( ) const
Returns
Currently set global mouse click callback.

◆ getMenuBarCallback()

menuBarCallback nkWinUi::InputSystem::getMenuBarCallback ( ) const
Returns
Currently set global menu bar callback.

◆ getCloseCallback()

closeCallback nkWinUi::InputSystem::getCloseCallback ( ) const
Returns
Currently set global close callback.

◆ getContextMenuCreationCallback()

contextMenuCreationCallback nkWinUi::InputSystem::getContextMenuCreationCallback ( ) const
Returns
Currently set global context menu creation callback.

◆ getFollowedWindows()

const std::map<Component*, std::pair<bool, bool> >& nkWinUi::InputSystem::getFollowedWindows ( ) const
Returns
The currenty memory for windows followed for cursor exit.

◆ setMouseClickCallback()

void nkWinUi::InputSystem::setMouseClickCallback ( mouseClickCallback  callback)

Sets the global mouse click callback to use. This function will be the fallback for all component not having a dedicated callback.

Parameters
callbackThe callback to use.

◆ setMouseLeaveCallback()

void nkWinUi::InputSystem::setMouseLeaveCallback ( mouseLeaveCallback  callback)

Sets the global mouse leave callback. This function will be the fallback for all component not having a dedicated callback.

Parameters
callbackThe callback to use.

◆ setKeyDownCallback()

void nkWinUi::InputSystem::setKeyDownCallback ( keyDownCallback  callback)

Sets the global key down callback to use. This function will be the fallback for all component not having a dedicated callback.

Parameters
callbackThe callback to use.

◆ setKeyUpCallback()

void nkWinUi::InputSystem::setKeyUpCallback ( keyUpCallback  callback)

Sets the global key up callback to use. This function will be the fallback for all component not having a dedicated callback.

Parameters
callbackThe callback to use.

◆ setMenuCallback()

void nkWinUi::InputSystem::setMenuCallback ( menuBarCallback  callback)

Sets the global menu bar callback to use. This function will be the fallback for all component not having a dedicated callback.

Parameters
callbackThe callback to use.

◆ setCheckBoxCallback()

void nkWinUi::InputSystem::setCheckBoxCallback ( checkBoxCallback  callback)

Sets the global check box callback to use. This function will be the fallback for all component not having a dedicated callback.

Parameters
callbackThe callback to use.

◆ setTreeSelectionCallback()

void nkWinUi::InputSystem::setTreeSelectionCallback ( treeSelectionCallback  callback)

Sets the global tree selection callback to use. This function will be the fallback for all component not having a dedicated callback.

Parameters
callbackThe callback to use.

◆ setListBoxSelectionCallback()

void nkWinUi::InputSystem::setListBoxSelectionCallback ( listBoxSelectionCallback  callback)

Sets the global list box selection callback to use. This function will be the fallback for all component not having a dedicated callback.

Parameters
callbackThe callback to use.

◆ setComboSelectionCallback()

void nkWinUi::InputSystem::setComboSelectionCallback ( comboSelectionCallback  callback)

Sets the global combo box selection callback to use. This function will be the fallback for all component not having a dedicated callback.

Parameters
callbackThe callback to use.

◆ setEditBoxKeyCallback()

void nkWinUi::InputSystem::setEditBoxKeyCallback ( editBoxKeyCallback  callback)

Sets the global edit box callback to use. This function will be the fallback for all component not having a dedicated callback.

Parameters
callbackThe callback to use.

◆ setTabWindowCallback()

void nkWinUi::InputSystem::setTabWindowCallback ( tabWindowCallback  callback)

Sets the global tab window callback to use. This function will be the fallback for all component not having a dedicated callback.

Parameters
callbackThe callback to use.

◆ setCloseCallback()

void nkWinUi::InputSystem::setCloseCallback ( closeCallback  callback)

Sets the global close callback to use. This function will be the fallback for all component not having a dedicated callback.

Parameters
callbackThe callback to use.

◆ setContextMenuCreationCallback()

void nkWinUi::InputSystem::setContextMenuCreationCallback ( contextMenuCreationCallback  callback)

Sets the global context menu creation callback to use. This function will be the fallback for all component not having a dedicated callback.

Parameters
callbackThe callback to use.

The documentation for this class was generated from the following file: